Next | Prev | Up | Top | Contents | Index

Starting SLIP or PPP at Boot Time

To have a SLIP or PPP connection between networks start automatically, create a local network script, /etc/init.d/network.local, for that purpose. The script resides on the station where you want to initiate the link and should be linked to appropriate files in the /etc/rc2.d and /etc/rc0.d directories. For example, to automatically start the demand-dialed PPP link described in "Sample PPP Configuration for Dial-Out", you would create a local network script on caesar.salad.com. The script should start PPP when called with the argument start, and terminate it when called with the argument stop.

#!/bin/sh
# ppp boot startup script
case $1 in
   start)
       /etc/killall ppp
       if /etc/chkconfig ppp && test -x /usr/etc/ppp -a -s /etc/ppp.conf
       then
           /usr/etc/ppp -r salad &
       fi
       ;;
   stop)
       /etc/killall -TERM ppp
       ;;
   *)
       echo "usage: $0 {start|stop}"
       ;;
esac
This script should be linked to the appropriate filenames in the /etc/rc2.d and /etc/rc0.d directories:

ln -s /etc/init.d/network.local /etc/rc2.d/S31netlocal
ln -s /etc/init.d/network.local /etc/rc0.d/K39netlocal


Next | Prev | Up | Top | Contents | Index